<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/main_coordinator"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:id="@+id/main"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:paddingStart="10dp"
            android:paddingEnd="10dp">

            <androidx.constraintlayout.motion.widget.MotionLayout
                android:id="@+id/wikipedia_motion"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:paddingStart="10dp"
                android:paddingEnd="10dp"
                app:layoutDescription="@xml/motion_scene_wikipedia">

                <androidx.appcompat.widget.AppCompatImageView
                    android:id="@+id/wiki_button"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginEnd="8dp"
                    android:layout_marginBottom="10dp"
                    android:visibility="visible"
                    app:layout_constraintBottom_toBottomOf="@+id/input_layout"
                    app:layout_constraintEnd_toEndOf="parent"
                    app:layout_constraintTop_toTopOf="@+id/input_layout"
                    app:srcCompat="@drawable/ic_wikipedia" />

                <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/input_layout"
                    style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:hint="@string/search_wiki"
                    app:counterEnabled="true"
                    app:counterMaxLength="20"
                    app:endIconCheckable="true"
                    app:endIconDrawable="@drawable/ic_search"
                    app:endIconMode="custom"
                    app:helperText="@string/wiki_helper_text"
                    app:layout_constraintBottom_toTopOf="@+id/image_view"
                    app:layout_constraintStart_toEndOf="parent">

                    <com.google.android.material.textfield.TextInputEditText
                        android:id="@+id/input_edit_text"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:inputType="text" />
                </com.google.android.material.textfield.TextInputLayout>
            </androidx.constraintlayout.motion.widget.MotionLayout>

            <FrameLayout
                android:id="@+id/PictureLayout"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:background="@color/material_dynamic_neutral_variant80"
                app:layout_constraintTop_toBottomOf="@+id/wikipedia_motion"
                app:layout_constraintVertical_chainStyle="packed">


                <com.nasa_gallery.ui.MyCustomImageView
                    android:id="@+id/image_view"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/picture_size"
                    android:layout_gravity="center"
                    android:contentDescription="@string/photo_of_the_day_stub"
                    android:scaleType="centerCrop"
                    app:srcCompat="@drawable/ic_no_photo_vector" />

                <ProgressBar
                    android:id="@+id/loading"
                    style="?android:attr/progressBarStyleLarge"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:visibility="gone" />

                <WebView
                    android:id="@+id/web_view_player"
                    android:layout_width="match_parent"
                    android:layout_height="@dimen/picture_size"
                    android:layout_gravity="center"
                    android:contentDescription="@string/video"
                    android:scaleType="centerCrop"
                    android:visibility="gone"
                    app:srcCompat="@android:drawable/ic_media_play" />

            </FrameLayout>

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guideline_five"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintGuide_percent="0.75" />

            <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
                android:id="@+id/extended_fab"
                android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:contentDescription="@string/help"
                android:text="@string/help"
                app:borderWidth="@dimen/size_fab"
                app:icon="?attr/actionModePasteDrawable"
                app:iconTint="@color/cardview_dark_background"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHeight_percent="0.1"
                app:layout_constraintTop_toBottomOf="@+id/PictureLayout" />

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guideline_vertical"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="vertical"
                app:layout_constraintGuide_percent="0.1" />

            <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
                android:id="@+id/description_fab"
                android:layout_width="wrap_content"
                android:layout_height="0dp"
                android:contentDescription="@string/description"
                android:text="@string/description"
                app:borderWidth="@dimen/size_fab"
                app:icon="?attr/actionModeCopyDrawable"
                app:iconTint="@color/cardview_dark_background"
                app:layout_constraintHeight_percent="0.1"
                app:layout_constraintStart_toStartOf="@+id/guideline_vertical"
                app:layout_constraintTop_toBottomOf="@+id/PictureLayout" />

            <androidx.constraintlayout.widget.Guideline
                android:id="@+id/guideline_four"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:orientation="horizontal"
                app:layout_constraintGuide_percent="0.1" />

        </androidx.constraintlayout.widget.ConstraintLayout>


    </androidx.core.widget.NestedScrollView>

    <include layout="@layout/bottom_sheet_layout" />


</androidx.coordinatorlayout.widget.CoordinatorLayout>
